<ul class="list-group list-group-flush ">
<?php foreach($navs as $nav){     
    if($nav['type'] && !user_id()){
        continue;
    }
    $active = stripos($url,$nav['url']) ? ' active':'';
    ?>
    <a href="<?=$nav['url'].'?user_id='.$user_id?>" class="list-group-item list-group-item-action <?=$active?>"><?=$nav['title']?></a>
<?php } ?>
</ul>